﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Reflection;

namespace YJKDataBase
{
	public class SqliteObjectTable : IObjectTable
	{
		public SqliteObjectTable(SqliteDatabase db)
		{
			this.mDatabase = db;
		}

		public bool Add(DbCategory category, DbObject dbObject, DbTransaction tr)
		{
			bool result = false;
			byte[] array = null;
			if (dbObject.Image != null)
			{
				MemoryStream memoryStream = new MemoryStream();
				dbObject.Image.Save(memoryStream, ImageFormat.Jpeg);
				array = memoryStream.ToArray();
			}
			try
			{
				using (DbCommand dbCommand = this.mDatabase.dbCon.CreateCommand())
				{
					dbCommand.Transaction = tr;
					int num;
					if (dbObject.Limit)
					{
						num = 1;
					}
					else
					{
						num = 0;
					}
					dbCommand.CommandText = string.Format("insert into [ObjectTable]([Name],[Img],[ParentId],[Limit],[Version],[Description],[GUID],[Date],[eID1],[eID2],[tag1],[tag2]) values ('{0}',{1},'{2}','{3}','{4}','{5}','{6}',{7},'{8}',{9},'{10}','{11}')", new object[]
					{
						dbObject.Name,
						"@img",
						category.Guid.ToString(),
						num,
						dbObject.Version,
						dbObject.Description,
						dbObject.Guid.ToString(),
						"@date",
						dbObject.ExData.Eid1,
						dbObject.ExData.Eid2,
						dbObject.ExData.Tag1,
						dbObject.ExData.Tag2
					});
					object value = this.mDatabase.Sqlite.CreateInstance(SqliteDatabase.SQLiteParameter, true, BindingFlags.CreateInstance, null, new object[]
					{
						"@img",
						array
					}, null, new object[0]);
					dbCommand.Parameters.Add(value);
					object value2 = this.mDatabase.Sqlite.CreateInstance(SqliteDatabase.SQLiteParameter, true, BindingFlags.CreateInstance, null, new object[]
					{
						"@date",
						dbObject.Date
					}, null, new object[0]);
					dbCommand.Parameters.Add(value2);
					dbCommand.ExecuteNonQuery();
					dbObject.SetDatabase(this.mDatabase);
				}
				result = true;
			}
			catch (Exception ex)
			{
				throw ex;
			}
			return result;
		}

		public int Count(Parent parent)
		{
			return this.mDatabase.ExecQuery(string.Format("select [GUID] from [ObjectTable] where [ParentId]='{0}'", parent.Guid.ToString())).Rows.Count;
		}

		public int Count()
		{
			return this.mDatabase.ExecQuery(string.Format("select [GUID] from [ObjectTable]", Array.Empty<object>())).Rows.Count;
		}

		public bool Update(DbObject family)
		{
			int num = 0;
			if (family.Limit)
			{
				num = 1;
			}
			bool result;
			using (DbCommand dbCommand = this.mDatabase.dbCon.CreateCommand())
			{
				dbCommand.CommandText = string.Format("update [ObjectTable] set [Name]='{0}',[ParentId]='{1}',[Limit]='{2}',[Version]='{3}',[Description]='{4}',[Img]={5},[eID1]={6},[eID2]={7},[tag1]='{8}',[tag2]='{9}' where [GUID]='{10}'", new object[]
				{
					family.Name,
					family.ParentId.ToString(),
					num,
					family.Version,
					family.Description,
					"@img",
					family.ExData.Eid1,
					family.ExData.Eid2,
					family.ExData.Tag1,
					family.ExData.Tag2,
					family.Guid.ToString()
				});
				byte[] array = null;
				if (family.Image != null)
				{
					MemoryStream memoryStream = new MemoryStream();
					family.Image.Save(memoryStream, ImageFormat.Jpeg);
					array = memoryStream.ToArray();
				}
				object value = this.mDatabase.Sqlite.CreateInstance(SqliteDatabase.SQLiteParameter, true, BindingFlags.CreateInstance, null, new object[]
				{
					"@img",
					array
				}, null, new object[0]);
				dbCommand.Parameters.Add(value);
				if (dbCommand.ExecuteNonQuery() != -1)
				{
					result = true;
				}
				else
				{
					result = false;
				}
			}
			return result;
		}

		public void ReDateByNow(DbObject family)
		{
			string arg = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
			using (DbCommand dbCommand = this.mDatabase.dbCon.CreateCommand())
			{
				dbCommand.CommandText = string.Format("update [ObjectTable] set [Date]='{0}' where [GUID]='{1}'", arg, family.Guid.ToString());
				dbCommand.ExecuteNonQuery();
			}
		}

		public DbObject this[Guid id]
		{
			get
			{
				DataTable dataTable = this.mDatabase.ExecQuery("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [GUID]='" + id.ToString() + "'");
				if (dataTable != null && dataTable.Rows.Count > 0)
				{
					Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[0]["Img"]));
					DbObject dbObject = new DbObject(dataTable.Rows[0]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[0]["GUID"].ToString()));
					dbObject.Limit = Convert.ToBoolean(dataTable.Rows[0]["Limit"].ToString());
					dbObject.Version = dataTable.Rows[0]["Version"].ToString().Trim();
					dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[0]["Date"].ToString()));
					dbObject.Description = dataTable.Rows[0]["Description"].ToString().Trim();
					dbObject.SetParentId(new Guid(dataTable.Rows[0]["ParentId"].ToString()));
					dbObject.SetDatabase(this.mDatabase);
					if (dataTable.Rows[0]["eID1"].ToString() != "")
					{
						dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[0]["eID1"].ToString());
					}
					if (dataTable.Rows[0]["eID2"].ToString() != "")
					{
						dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[0]["eID2"].ToString());
					}
					dbObject.ExData.Tag1 = dataTable.Rows[0]["tag1"].ToString();
					dbObject.ExData.Tag2 = dataTable.Rows[0]["tag2"].ToString();
					return dbObject;
				}
				return null;
			}
		}

		public DbObject this[string name]
		{
			get
			{
				DataTable dataTable = this.mDatabase.ExecQuery("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [Name]='" + name + "'");
				if (dataTable != null && dataTable.Rows.Count > 0)
				{
					Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[0]["Img"]));
					DbObject dbObject = new DbObject(dataTable.Rows[0]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[0]["GUID"].ToString()));
					dbObject.Limit = Convert.ToBoolean(dataTable.Rows[0]["Limit"].ToString());
					dbObject.Version = dataTable.Rows[0]["Version"].ToString().Trim();
					dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[0]["Date"].ToString()));
					dbObject.Description = dataTable.Rows[0]["Description"].ToString().Trim();
					dbObject.SetParentId(new Guid(dataTable.Rows[0]["ParentId"].ToString()));
					dbObject.SetDatabase(this.mDatabase);
					if (dataTable.Rows[0]["eID1"].ToString() != "")
					{
						dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[0]["eID1"].ToString());
					}
					if (dataTable.Rows[0]["eID2"].ToString() != "")
					{
						dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[0]["eID2"].ToString());
					}
					dbObject.ExData.Tag1 = dataTable.Rows[0]["tag1"].ToString();
					dbObject.ExData.Tag2 = dataTable.Rows[0]["tag2"].ToString();
					return dbObject;
				}
				return null;
			}
		}

		public List<DbObject> this[Parent parent]
		{
			get
			{
				List<DbObject> list = new List<DbObject>();
				DataTable dataTable = this.mDatabase.ExecQuery("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [ParentId]='" + parent.Guid.ToString() + "'");
				if (dataTable != null)
				{
					for (int i = 0; i < dataTable.Rows.Count; i++)
					{
						Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[i]["Img"]));
						DbObject dbObject = new DbObject(dataTable.Rows[i]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[i]["GUID"].ToString()));
						dbObject.Limit = Convert.ToBoolean(dataTable.Rows[i]["Limit"].ToString());
						dbObject.Version = dataTable.Rows[i]["Version"].ToString().Trim();
						dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[i]["Date"].ToString()));
						dbObject.Description = dataTable.Rows[i]["Description"].ToString().Trim();
						dbObject.SetParentId(new Guid(dataTable.Rows[i]["ParentId"].ToString()));
						dbObject.SetDatabase(this.mDatabase);
						if (dataTable.Rows[i]["eID1"].ToString() != "")
						{
							dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[i]["eID1"].ToString());
						}
						if (dataTable.Rows[i]["eID2"].ToString() != "")
						{
							dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[i]["eID2"].ToString());
						}
						dbObject.ExData.Tag1 = dataTable.Rows[i]["tag1"].ToString();
						dbObject.ExData.Tag2 = dataTable.Rows[i]["tag2"].ToString();
						list.Add(dbObject);
					}
				}
				return list;
			}
		}

		public List<DbObject> this[Parent parent, int start, int end]
		{
			get
			{
				List<DbObject> list = new List<DbObject>();
				DataTable dataTable = this.mDatabase.ExecQuery(string.Concat(new string[]
				{
					"select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [ParentId]='",
					parent.Guid.ToString(),
					"' limit ",
					(end - start).ToString(),
					" offset ",
					start.ToString()
				}));
				if (dataTable != null)
				{
					for (int i = 0; i < dataTable.Rows.Count; i++)
					{
						Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[i]["Img"]));
						DbObject dbObject = new DbObject(dataTable.Rows[i]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[i]["GUID"].ToString()));
						dbObject.Limit = Convert.ToBoolean(dataTable.Rows[i]["Limit"].ToString());
						dbObject.Version = dataTable.Rows[i]["Version"].ToString().Trim();
						dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[i]["Date"].ToString()));
						dbObject.Description = dataTable.Rows[i]["Description"].ToString().Trim();
						dbObject.SetParentId(new Guid(dataTable.Rows[i]["ParentId"].ToString()));
						dbObject.SetDatabase(this.mDatabase);
						if (dataTable.Rows[i]["eID1"].ToString() != "")
						{
							dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[i]["eID1"].ToString());
						}
						if (dataTable.Rows[i]["eID2"].ToString() != "")
						{
							dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[i]["eID2"].ToString());
						}
						dbObject.ExData.Tag1 = dataTable.Rows[i]["tag1"].ToString();
						dbObject.ExData.Tag2 = dataTable.Rows[i]["tag2"].ToString();
						list.Add(dbObject);
					}
				}
				return list;
			}
		}

		public List<DbObject> GetAll()
		{
			List<DbObject> list = new List<DbObject>();
			DataTable dataTable = this.mDatabase.ExecQuery("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable]");
			if (dataTable != null)
			{
				for (int i = 0; i < dataTable.Rows.Count; i++)
				{
					Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[i]["Img"]));
					DbObject dbObject = new DbObject(dataTable.Rows[i]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[i]["GUID"].ToString().Trim()));
					dbObject.Limit = Convert.ToBoolean(dataTable.Rows[i]["Limit"].ToString());
					dbObject.Version = dataTable.Rows[i]["Version"].ToString().Trim();
					dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[i]["Date"].ToString()));
					dbObject.Description = dataTable.Rows[i]["Description"].ToString().Trim();
					dbObject.SetParentId(new Guid(dataTable.Rows[i]["ParentId"].ToString().Trim()));
					dbObject.SetDatabase(this.mDatabase);
					if (dataTable.Rows[i]["eID1"].ToString() != "")
					{
						dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[i]["eID1"].ToString());
					}
					if (dataTable.Rows[i]["eID2"].ToString() != "")
					{
						dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[i]["eID2"].ToString());
					}
					dbObject.ExData.Tag1 = dataTable.Rows[i]["tag1"].ToString();
					dbObject.ExData.Tag2 = dataTable.Rows[i]["tag2"].ToString();
					list.Add(dbObject);
				}
			}
			return list;
		}

		public bool Remove(DbObject family, DbTransaction tr)
		{
			bool result;
			try
			{
				this.mDatabase.ExecuteCommand("delete from [ObjectTable] where [GUID]='" + family.Guid.ToString() + "'", tr);
				result = true;
			}
			catch
			{
				result = false;
			}
			return result;
		}

		public List<DbObject> SearchFamily(string familyName, int start, int end)
		{
			List<DbObject> list = new List<DbObject>();
			DbTransaction tr = this.mDatabase.StartTransaction();
			try
			{
				DataTable dataTable = this.mDatabase.ExecQuery(string.Concat(new string[]
				{
					"select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [Name] like'%",
					familyName,
					"%' limit ",
					(end - start).ToString(),
					" offset ",
					start.ToString()
				}), tr);
				if (dataTable != null)
				{
					for (int i = 0; i < dataTable.Rows.Count; i++)
					{
						Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[i]["Img"]));
						DbObject dbObject = new DbObject(dataTable.Rows[i]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[i]["GUID"].ToString().Trim()));
						dbObject.Limit = Convert.ToBoolean(dataTable.Rows[i]["Limit"].ToString());
						dbObject.Version = dataTable.Rows[i]["Version"].ToString().Trim();
						dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[i]["Date"].ToString()));
						dbObject.Description = dataTable.Rows[i]["Description"].ToString().Trim();
						dbObject.SetParentId(new Guid(dataTable.Rows[i]["ParentId"].ToString().Trim()));
						dbObject.SetDatabase(this.mDatabase);
						if (dataTable.Rows[i]["eID1"].ToString() != "")
						{
							dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[i]["eID1"].ToString());
						}
						if (dataTable.Rows[i]["eID2"].ToString() != "")
						{
							dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[i]["eID2"].ToString());
						}
						dbObject.ExData.Tag1 = dataTable.Rows[i]["tag1"].ToString();
						dbObject.ExData.Tag2 = dataTable.Rows[i]["tag2"].ToString();
						list.Add(dbObject);
					}
				}
			}
			catch
			{
			}
			return list;
		}

		public List<DbObject> SearchFamily(string familyName)
		{
			List<DbObject> list = new List<DbObject>();
			DbTransaction tr = this.mDatabase.StartTransaction();
			try
			{
				DataTable dataTable = this.mDatabase.ExecQuery("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [Name] like'%" + familyName + "%'", tr);
				if (dataTable != null)
				{
					for (int i = 0; i < dataTable.Rows.Count; i++)
					{
						Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[i]["Img"]));
						DbObject dbObject = new DbObject(dataTable.Rows[i]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[i]["GUID"].ToString().Trim()));
						dbObject.Limit = Convert.ToBoolean(dataTable.Rows[i]["Limit"].ToString());
						dbObject.Version = dataTable.Rows[i]["Version"].ToString().Trim();
						dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[i]["Date"].ToString()));
						dbObject.Description = dataTable.Rows[i]["Description"].ToString().Trim();
						dbObject.SetParentId(new Guid(dataTable.Rows[i]["ParentId"].ToString().Trim()));
						dbObject.SetDatabase(this.mDatabase);
						if (dataTable.Rows[i]["eID1"].ToString() != "")
						{
							dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[i]["eID1"].ToString());
						}
						if (dataTable.Rows[i]["eID2"].ToString() != "")
						{
							dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[i]["eID2"].ToString());
						}
						dbObject.ExData.Tag1 = dataTable.Rows[i]["tag1"].ToString();
						dbObject.ExData.Tag2 = dataTable.Rows[i]["tag2"].ToString();
						list.Add(dbObject);
					}
				}
			}
			catch
			{
			}
			return list;
		}

		public int SearchFamilyCount(string familyName)
		{
			new List<DbObject>();
			int result = 0;
			DbTransaction tr = this.mDatabase.StartTransaction();
			try
			{
				DataTable dataTable = this.mDatabase.ExecQuery("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[KeyName],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [Name] like'%" + familyName + "%'", tr);
				if (dataTable != null)
				{
					result = dataTable.Rows.Count;
				}
			}
			catch
			{
			}
			return result;
		}

		public List<DbObject> SearchFamily(DateTime startTime, DateTime endTime, int start, int end)
		{
			List<DbObject> list = new List<DbObject>();
			DbTransaction tr = this.mDatabase.StartTransaction();
			try
			{
				DataTable dataTable = this.mDatabase.ExecQuery(string.Format("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [Date] BETWEEN '{0}' AND '{1} limit {2} offset {3}'", new object[]
				{
					startTime.ToString("yyyy-MM-dd"),
					endTime.ToString("yyyy-MM-dd"),
					(end - start).ToString(),
					start.ToString()
				}), tr);
				if (dataTable != null)
				{
					for (int i = 0; i < dataTable.Rows.Count; i++)
					{
						Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[i]["Img"]));
						DbObject dbObject = new DbObject(dataTable.Rows[i]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[i]["GUID"].ToString().Trim()));
						dbObject.Limit = Convert.ToBoolean(dataTable.Rows[i]["Limit"].ToString());
						dbObject.Version = dataTable.Rows[i]["Version"].ToString().Trim();
						dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[i]["Date"].ToString()));
						dbObject.Description = dataTable.Rows[i]["Description"].ToString().Trim();
						dbObject.SetParentId(new Guid(dataTable.Rows[i]["ParentId"].ToString().Trim()));
						dbObject.SetDatabase(this.mDatabase);
						if (dataTable.Rows[i]["eID1"].ToString() != "")
						{
							dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[i]["eID1"].ToString());
						}
						if (dataTable.Rows[i]["eID2"].ToString() != "")
						{
							dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[i]["eID2"].ToString());
						}
						dbObject.ExData.Tag1 = dataTable.Rows[i]["tag1"].ToString();
						dbObject.ExData.Tag2 = dataTable.Rows[i]["tag2"].ToString();
						list.Add(dbObject);
					}
				}
			}
			catch
			{
			}
			return list;
		}

		public List<DbObject> SearchFamily(DateTime startTime, DateTime endTime)
		{
			List<DbObject> list = new List<DbObject>();
			DbTransaction tr = this.mDatabase.StartTransaction();
			try
			{
				DataTable dataTable = this.mDatabase.ExecQuery(string.Format("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [Date] BETWEEN '{0}' AND '{1}'", startTime.ToString("yyyy-MM-dd"), endTime.ToString("yyyy-MM-dd")), tr);
				if (dataTable != null)
				{
					for (int i = 0; i < dataTable.Rows.Count; i++)
					{
						Image img = new Bitmap(new MemoryStream((byte[])dataTable.Rows[i]["Img"]));
						DbObject dbObject = new DbObject(dataTable.Rows[i]["Name"].ToString().Trim(), img, new Guid(dataTable.Rows[i]["GUID"].ToString().Trim()));
						dbObject.Limit = Convert.ToBoolean(dataTable.Rows[i]["Limit"].ToString());
						dbObject.Version = dataTable.Rows[i]["Version"].ToString().Trim();
						dbObject.SetDate(Convert.ToDateTime(dataTable.Rows[i]["Date"].ToString()));
						dbObject.Description = dataTable.Rows[i]["Description"].ToString().Trim();
						dbObject.SetParentId(new Guid(dataTable.Rows[i]["ParentId"].ToString().Trim()));
						dbObject.SetDatabase(this.mDatabase);
						if (dataTable.Rows[i]["eID1"].ToString() != "")
						{
							dbObject.ExData.Eid1 = Convert.ToInt32(dataTable.Rows[i]["eID1"].ToString());
						}
						if (dataTable.Rows[i]["eID2"].ToString() != "")
						{
							dbObject.ExData.Eid2 = Convert.ToInt32(dataTable.Rows[i]["eID2"].ToString());
						}
						dbObject.ExData.Tag1 = dataTable.Rows[i]["tag1"].ToString();
						dbObject.ExData.Tag2 = dataTable.Rows[i]["tag2"].ToString();
						list.Add(dbObject);
					}
				}
			}
			catch
			{
			}
			return list;
		}

		public int SearchFamilyCount(DateTime startTime, DateTime endTime)
		{
			new List<DbObject>();
			DbTransaction tr = this.mDatabase.StartTransaction();
			int result = 0;
			try
			{
				DataTable dataTable = this.mDatabase.ExecQuery(string.Format("select [Img],[Limit],[Name],[ParentId],[Version],[Date],[Description],[GUID],[KeyName],[eID1],[eID2],[tag1],[tag2] from [ObjectTable] where [Date] BETWEEN '{0}' AND '{1}'", startTime.ToString("yyyy-MM-dd"), endTime.ToString("yyyy-MM-dd")), tr);
				if (dataTable != null)
				{
					result = dataTable.Rows.Count;
				}
			}
			catch
			{
			}
			return result;
		}

		private SqliteDatabase mDatabase;
	}
}
